package com.bsoft.gol.hcs.specialist.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * @Description 专科随访订阅实体类
 * @author zhengcb10708
 * @describe
 * @create 2020-08-12 22:48
 */
@Entity
@Table(name = "follow_up_subsmodule")
public class FollowUpSubsmoduleEntity {
    private int moduleId;
    private String moduleCode;
    private String moduleName;
    private String organizationId;
    private String departmentId;
    private String doctorId;
    private String subScriptionType;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date createDt;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date  lastModifyDt;
    private String isEnable;

    @Id
    @Column(name = "moduleId")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getModuleId() {
        return moduleId;
    }

    public void setModuleId(int moduleId) {
        this.moduleId = moduleId;
    }

    @Basic
    @Column(name = "moduleCode")
    public String getModuleCode() {
        return moduleCode;
    }

    public void setModuleCode(String moduleCode) {
        this.moduleCode = moduleCode;
    }

    @Basic
    @Column(name = "moduleName")
    public String getModuleName() {
        return moduleName;
    }

    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    @Basic
    @Column(name = "organization_id")
    public String getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }

    @Basic
    @Column(name = "department_id")
    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    @Basic
    @Column(name = "doctor_id")
    public String getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(String doctorId) {
        this.doctorId = doctorId;
    }

    @Basic
    @Column(name = "subScriptionType")
    public String getSubScriptionType() {
        return subScriptionType;
    }

    public void setSubScriptionType(String subScriptionType) {
        this.subScriptionType = subScriptionType;
    }

    @Basic
    @Column(name = "createDt")
    public Date getCreateDt() {
        return createDt;
    }

    public void setCreateDt(Date createDt) {
        this.createDt = createDt;
    }

    @Basic
    @Column(name = "lastModifyDt")
    public Date getLastModifyDt() {
        return lastModifyDt;
    }

    public void setLastModifyDt(Date lastModifyDt) {
        this.lastModifyDt = lastModifyDt;
    }

    @Basic
    @Column(name = "isEnable")
    public String getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(String isEnable) {
        this.isEnable = isEnable;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FollowUpSubsmoduleEntity that = (FollowUpSubsmoduleEntity) o;
        return moduleId == that.moduleId &&
                Objects.equals(moduleCode, that.moduleCode) &&
                Objects.equals(moduleName, that.moduleName) &&
                Objects.equals(organizationId, that.organizationId) &&
                Objects.equals(departmentId, that.departmentId) &&
                Objects.equals(doctorId, that.doctorId) &&
                Objects.equals(subScriptionType, that.subScriptionType) &&
                Objects.equals(createDt, that.createDt) &&
                Objects.equals(lastModifyDt, that.lastModifyDt) &&
                Objects.equals(isEnable, that.isEnable);
    }

    @Override
    public int hashCode() {
        return Objects.hash(moduleId, moduleCode, moduleName, organizationId, departmentId, doctorId, subScriptionType, createDt, lastModifyDt, isEnable);
    }
}
